<template>
  <div>
    <button @click="cop = 'Home'">Home</button>
    <button @click="cop = 'About'">About</button>

    <keep-alive>
      <component :is="cop"></component>
    </keep-alive>
  </div>
</template>
<script>
// import Home from "./components/Home.vue";
// import About from "./components/About.vue";
const Home = () => import("./components/Home.vue");
const About = () => import("./components/About.vue");
export default {
  name: "DCA",
  data() {
    return {
      cop: "Home",
    };
  },
  components: {
    Home,
    About,
  },
};
</script>

<style lang="less" scoped></style>
